package com.jimikongjian.models;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Repository;

import java.sql.Timestamp;

/**
 * Created by fuxiuyang on 17/2/20.
 */
@Scope("prototype")
@Repository("notification")
public class Notification {

    /**
     * 初始化id号，将id号置为-1
     */
    public static final int INIT_ID = -1;

    /**
     * 表示通知未被查看
     */
    public static final int STATUS_UNREAD = 0;

    /**
     * 表示通知被查看
     */
    public static final int STATUS_READ = 1;

    /**
     * 自身的id号
     */
    private int id;

    /**
     * 创建通知的通知者的用户id号
     */
    private int notifyId = Notification.INIT_ID;

    /**
     * 创建通知的通知者的昵称
     */
    private String notifyNick;

    /**
     * 申请者的头像
     */
    private String notifyAvatar;

    /**
     * 通知的内容
     */
    private String content;

    /**
     * 被通知者的用户id号
     */
    private int notifiedId = Notification.INIT_ID;

    /**
     * 被通知者的用户昵称
     */
    private String notifiedNick;

    /**
     * 查看状态
     * 0：表示通知未被查看
     * 1：表示通知已被查看
     */
    private int status = Notification.STATUS_UNREAD;

    /**
     * 未读通知消息条数
     */
    private int unreadCount = 0;

    /**
     * 通知创建的时间
     */
    private Timestamp createTime;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getNotifyId() {
        return notifyId;
    }

    public void setNotifyId(int notifyId) {
        this.notifyId = notifyId;
    }

    public String getNotifyNick() {
        return notifyNick;
    }

    public void setNotifyNick(String notifyNick) {
        this.notifyNick = notifyNick;
    }

    public String getNotifyAvatar() {
        return notifyAvatar;
    }

    public void setNotifyAvatar(String notifyAvatar) {
        this.notifyAvatar = notifyAvatar;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getNotifiedId() {
        return notifiedId;
    }

    public void setNotifiedId(int notifiedId) {
        this.notifiedId = notifiedId;
    }

    public String getNotifiedNick() {
        return notifiedNick;
    }

    public void setNotifiedNick(String notifiedNick) {
        this.notifiedNick = notifiedNick;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getUnreadCount() {
        return unreadCount;
    }

    public void setUnreadCount(int unreadCount) {
        this.unreadCount = unreadCount;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }
}
